#include <iostream>
#include <vector>
using namespace std;
int Less(int a, int b)
{
    return a > b ? b : a;
}
int main()
{
    int t = 0;
    cin >> t;
    int i = 0;
    for (i = 0; i < t; i++)
    {
        int n = 0;
        int k = 0;
        cin >> n;
        cin >> k;
        vector<int> arr(n);
        int j = 0;
        for (j = 0; j < n; j++)
        {
            cin >> arr[j];
        }
        int last = n - 1;
        int time = 0;
        while (arr[last] <= n && time < Less(n, k))
        {
            last = (last - arr[last] + n) % n;
            time++;
        }
        if (time == Less(n, k))
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}